#include "gtkshadowprivate.h"
#include "gtkstylecontext.h"
+#include "gtkpango.h"
typedef struct _GtkShadowElement GtkShadowElement;
return g_string_free (str, FALSE);
}
+
+void
+_gtk_text_shadow_paint_layout (GtkShadow *shadow,
+ cairo_t *cr,
+ gdouble x,
+ gdouble y,
+ PangoLayout *layout)
+{
+ GList *l;
+ GtkShadowElement *element;
+
+ /* render shadows starting from the last one,
+ * and the others on top.
+ */
+ for (l = g_list_last (shadow->elements); l != NULL; l = l->prev)
+ {
+ element = l->data;
+
+ cairo_save (cr);
+
+ cairo_move_to (cr, x + element->hoffset, y + element->voffset);
+ gdk_cairo_set_source_rgba (cr, &element->color);
+ _gtk_pango_fill_layout (cr, layout);
+
+ cairo_restore (cr);
+ }
+}
+
#include <glib-object.h>
#include <gtk/gtkstyleproperties.h>
#include <gtk/gtksymboliccolor.h>
+#include <gtk/gtkicontheme.h>
G_BEGIN_DECLS
GtkStyleProperties *props);
gboolean _gtk_shadow_get_resolved (GtkShadow *shadow);
+void _gtk_text_shadow_paint_layout (GtkShadow *shadow,
+ cairo_t *cr,
+ gdouble x,
+ gdouble y,
+ PangoLayout *layout);
+
G_END_DECLS
#endif /* __GTK_SHADOW_H__ */